//
//  RouteTableViewCell.m
//  TeamProject_Travel
//
//  Created by lanou3g on 16/3/25.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "RouteTableViewCell.h"

@implementation RouteTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initLayout];
    }
    return self;
}

- (void)initLayout{
    self.backImageView = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, [UIScreen mainScreen].bounds.size.width - 10, [UIScreen mainScreen].bounds.size.width / 2)];
    [self.contentView addSubview:self.backImageView];
    
    self.titlelabel = [[UILabel alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(self.backImageView.frame) - 70, [UIScreen mainScreen].bounds.size.width - 20, 40)];
    self.titlelabel.textColor = [UIColor whiteColor];
    self.titlelabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.titlelabel];
    
    self.destinationLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(self.titlelabel.frame) - 10, [UIScreen mainScreen].bounds.size.width - 20, 30)];
    self.destinationLabel.textColor = [UIColor whiteColor];
    self.destinationLabel.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.destinationLabel];
    
    self.discriptionLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, CGRectGetMaxY(self.backImageView.frame), [UIScreen mainScreen].bounds.size.width - 30, 50)];
    self.discriptionLabel.numberOfLines = 0;
    [self.contentView addSubview:self.discriptionLabel];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
